home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 8 / FM Towns Free Software Collection 8.iso / t_os / gpen32k / source / lib / osrc / kksub.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-01  |  625 b   |  38 lines

  1.  
  2. #include    <stdlib.h>
  3. #include    <kkstr2.h>
  4. #include    <Normlib.h>
  5.  
  6. extern char work[];
  7. int kkx=0, kky=0;
  8.  
  9. void kkpos( int *x, int *y)
  10. {
  11.     *x = kkx;
  12.     *y = kky;
  13. }
  14.  
  15. void kkinit(int scmd, int msmd)
  16. {
  17.     static char *kaw;
  18.     int col[16] = {
  19.             0x08,    0x01,    0x02,    0x03,
  20.             0x04,    0x05,    0x06,    0x0f,
  21.             0x00,    0x09,    0x0a,    0x0b,
  22.             0x0c,    0x0d,    0x0e,    0x0f,
  23.         };
  24.     KANJ kk;
  25.     kk.scrn = scmd;
  26.     kk.egbw = work;
  27.     kk.wPage = 0;
  28.     kk.gets = 0;
  29.     kk.getPos = kkpos;
  30.     kk.mosAp = msmd;
  31.     kk.maxX = 639;
  32.     kk.maxY = 479;
  33.     KAN_prepare(&kk);
  34.     kaw = malloc( KAN_getWorkSize() );
  35.     KAN_setWorkAdd(0x14,kaw);
  36.     KAN_setClrTbl(col);
  37. }
  38.